package com.moxigua.iotbox.func;

import android.content.Intent;
import android.os.Handler;
import android.util.Log;

import com.moxigua.iotbox.R;
import com.moxigua.iotbox.base.BaseActivity;

public class SplashActivity extends BaseActivity {
	private static final String TAG = "SplashActivity";

	@Override
	protected void initView() {
		Log.e(TAG, "initView: " );
		new Handler().postDelayed(new Runnable() {
			@Override
			public void run() {
				isFirstRun();
				SplashActivity.this.finish();
			}
		}, 1500);
	}

	private void isFirstRun() {
		//使用sp文件在登陆过之后直接连接mqtt服务器

		startActivity(new Intent(SplashActivity.this, MainActivity.class));
	}

	@Override
	protected int getLayoutId() {
		return R.layout.activity_splash;
	}

}
